﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for InventoryListBZ
/// </summary>
public class InventoryListBZ
{
	public InventoryListBZ()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    public DataTable GetEmptyList()
    {
        DataTable dt = new DataTable();
        dt.Columns.Add(new DataColumn("ProductID", typeof(System.Int32)));
        dt.Columns.Add(new DataColumn("ProductCode", typeof(System.String)));
        dt.Columns.Add(new DataColumn("ProductName", typeof(System.String)));
        dt.Columns.Add(new DataColumn("ProductModule", typeof(System.String)));
        dt.Columns.Add(new DataColumn("ProductColor", typeof(System.String)));
        dt.Columns.Add(new DataColumn("Quantity", typeof(System.Decimal)));
        return dt;
    }

    public void GetProductInfo(string productcode, out int id, out string name, out string module, out string color)
    {
        SystemFunction.GetProductInfo(productcode, out id, out name, out module, out color);
    }

    public void GetProductInfo(int id, out string productcode, out string name, out string module, out string color)
    {
        SystemFunction.GetProductInfo(id, out productcode, out name, out module, out color);
    }

    public static InventoryListBZ GetInventoryListBZ(string pagetitle)
    {
        if ("录入/修改入库单" == pagetitle)
            return new WarehouseListBZ();
        if ("录入/修改出库单" == pagetitle)
            return new DeliveredSheetBZ();
        return new InventoryListBZ();
    }

    virtual public string LabelListName
    {
        get { return ""; }
    }

    virtual public string LabelDate
    {
        get { return ""; }
    }

    virtual public string LabelListNumber
    {
        get { return ""; }
    }

    virtual public string ButtonSave
    {
        get { return ""; }
    }

    virtual public string ButtonClose
    {
        get { return ""; }
    }

    virtual public void GetListData(int listid,out DataTable dt,out int warehouseid,out DateTime date,out string listnumber)
    {
        throw new NotImplementedException();
    }

    virtual public int AddList(SqlCommand cmd, int warehouseid, DateTime createddate, string listnumber, DataTable dt)
    {
        throw new NotImplementedException();
    }

    virtual public void DeleteList(SqlCommand cmd, int ListID)
    {
        throw new NotImplementedException();
    }
}
